﻿/* File Created: octubre 7, 2013 */


function setCompleteDay(day)
{
    if (day > 9)
    {
        return day;
    }
    else{
        return "0" + day;
    }
}

function setCompletMonth(month) {

    if (month > 9)
    {
        return month;
    }
    else{
        return "0" + month;
    }
}

function numberDayToStringName(dayNumber)
{
    var weekday=new Array(7);
    weekday[0]="Lunes";
    weekday[1]="Martes";
    weekday[2]="Miercoles";
    weekday[3]="Jueves";
    weekday[4]="Viernes";
    weekday[5]="Sabado";
    weekday[6]="Domingo";
    
    return weekday[dayNumber];
}

//Funcion que retorna el numero correcto del dia, ya que javascript
function numberDayToCorrectNumberDay(oldDayNumber) {
    return oldDayNumber + 1;
}

function numberMonthToCorrectNumberMonth(oldMonthNumber)
{
    return oldMonthNumber + 1;
}

function numberMonthToStringMonth(numberMonth)
{
    var nameMonth = new Array(12);

    nameMonth[0] = "Enero";
    nameMonth[1] = "Febrero";
    nameMonth[2] = "Marzo";
    nameMonth[3] = "Abril";
    nameMonth[4] = "Mayo";
    nameMonth[5] = "Junio";
    nameMonth[6] = "Julio";
    nameMonth[7] = "Agosto";
    nameMonth[8] = "Septiembre";
    nameMonth[9] = "Octubre";
    nameMonth[10] = "Noviembre";
    nameMonth[11] = "Diciembre";

    return nameMonth[numberMonth];
    nameMonth[0] = "Enero";
}